<%@ page contentType="text/html;charset=UTF-8"%>
<link rel="stylesheet" type="text/css"
	href="${ctx}/widgets/ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css"
	href="${ctx}/widgets/silk/styles.css" />
<link rel="stylesheet" type="text/css"
	href="${ctx}/widgets/mstar/mstar-ext-all.css" />
<link rel="stylesheet" type="text/css"
	href="${ctx}/widgets/ext/ux/resource/css/MultiSelect.css" />
<link rel="stylesheet" type="text/css"
	href="${ctx}/widgets/ext/ux/resource/css/grouping.css" />
<link rel="stylesheet" type="text/css"
	href="${ctx}/widgets/ext/ux/resource/css/fileuploadfield.css" />
<link rel="stylesheet" type="text/css"
	href="${ctx}/css/extcss-patch.css" />
<script type="text/javascript"
	src="${ctx}/widgets/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="${ctx}/widgets/ext/ext-all.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/src/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/mstar/mstar-ext-all.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/ux/MultiSelect.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/ux/ItemSelector.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/ux/CheckColumn.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/ux/TextfieldMaxLength.js"></script>
<!--<script type="text/javascript" src="${ctx}/widgets/ext/ux/Ext.ux.UploadForm.js"></script>-->
<script type="text/javascript"
	src="${ctx}/widgets/ext/ux/MultiFileUploadField.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/ux/FileUploadField.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/ux/RowExpander.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/ux/ColumnHeaderGroup.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/ext/GroupHeaderPlugin.js"></script>
<script type="text/javascript" src="${ctx}/widgets/mdm/sysd-ext-all.js"></script>
<script type="text/javascript" src="${ctx}/widgets/mdm/mdm-ext-all.js"></script>

<!--<link rel="stylesheet" type="text/css" href="${ctx}/styles/default.css" />-->

<!--
<link rel="stylesheet" type="text/css" href="${ctx}/widgets/ext/resources/css/ext-patch.css" />
<script type="text/javascript" src="${ctx}/widgets/ext/ext-patch.js" ></script>
<script type="text/javascript" src="${ctx}/scripts/comm/comm.js" defer="defer"></script>
<script type="text/javascript" src="${ctx}/scripts/comm/columnLock.js" defer="defer"></script>
<script type="text/javascript" src="${ctx}/scripts/comm/ColumnNodeUI.js" defer="defer"></script >
<script type="text/javascript" src="${ctx}/scripts/comm/monthField.js" defer="defer"></script>
<link rel="stylesheet" type="text/css" href="${ctx}/styles/columnLock.css" />
-->
<style>
.x-column-tree .x-tree-node {
	zoom: 1;
}

.x-column-tree .x-tree-node-el {
	zoom: 1;
}

.x-column-tree .x-tree-selected {
	background: #D7F0F1;
}

.x-column-tree  .x-tree-node a {
	line-height: 18px;
	vertical-align: middle;
}

.x-column-tree  .x-tree-node a span {

}

.x-column-tree  .x-tree-node .x-tree-selected a span {
	background: transparent;
	color: #000;
}

.x-tree-col {
	float: left;
	overflow: hidden;
	padding: 0 1px;
	zoom: 1;
}

#tree .x-tree-col-text {
	text-align: left;
}

#tree .x-panel-body {
	background: #FFFFFF
}

.x-tree-col-text,.x-tree-hd-text {
	overflow: hidden;
	-o-text-overflow: ellipsis;
	text-overflow: ellipsis;
	padding: 3px 3px 3px 5px;
	white-space: nowrap;
	font: normal 11px arial, tahoma, helvetica, sans-serif;
	text-align: center;
}

.x-tree-headers {
	background: #f9f9f9 url(${ctx}/styles/images/grid3-hrow.gif) repeat-x 0
		bottom;
	position: relative;
	height: 16px;
	cursor: default;
	zoom: 1;
}

.x-tree-hd {
	float: left;
	overflow: hidden;
	border-left: 1px solid #eee;
	border-right: 1px solid #d0d0d0;
}

.tran_exception {
	background: '#FFD2D2'
}

.trigg_not_blank {
	float: right;
	position: absolute;
	padding: 5px 0px 0px 18px;
}

.field_not_blank {
	float: right;
	position: absolute;
	padding: 5px 0px 0px 0px;
}

.area_not_blank {
	float: right;
	position: absolute;
}

.x-form-trigger-tpl {
	width: 17px;
	height: 21px;
	border: 0;
	background: transparent
		url('${ctx}/widgets/ext/resources/images/default/form/trigger-tpl.gif')
		no-repeat 0 0;
	cursor: pointer;
	border-bottom: 1px solid #B5B8C8;
	position: absolute;
	top: 0;
}

.x-tree-node .x-tree-new-icon-positon {
	background: transparent url(../../pages/position/class-m.png) no-repeat
}

.x-tree-node .x-tree-node-icon-org {
	background: transparent url(../../pages/position/class-n.png) no-repeat
}

.x-tree-node .x-tree-node-icon-zi {
	background: transparent url(../../pages/position/class-o.png) no-repeat
}

<!--
标准类型   行业标准  省级标准  市级标准 -->.x-tree-node .industry_icon {
	background-image: url(../../images/industry_icon.png)
}

.x-tree-node .province_icon {
	background-image: url(../../images/province_icon.png)
}

.x-tree-node .city_icon {
	background-image: url(../../images/city_icon.png)
}
</style>



<script type="text/javascript">
	Ext.namespace('SYSD');
	SYSD.CTX = '${ctx}';
	SYSD.SYSTEM_CODE = 'MDMP';//系统代码
	//SYSD.LOGIN_TOKEN = '${tokenUrl}';
	SYSD.PERSONCODE = '${personCode}';
	var ctx = '${ctx}';
	Ext.BLANK_IMAGE_URL = '${ctx}/widgets/ext/resources/images/default/s.gif';
	Ext.Ajax.timeout = 600000;
<%--Ext.util.CSS.swapStyleSheet("theme", "${ctx}/widgets/ext/resources/css/xtheme-slate.css");--%>
	//** UserInfo **//
	Ext.namespace('Right.USER_INFO');
	Right.ORG_CODE = '${LOGIN_MDM_USER.orgCode}';
	Right.ORG_NAME = '${LOGIN_MDM_USER.orgName}';
	Right.DEPT_CODE = '${LOGIN_MDM_USER.deptCode}';
	Right.DEPT_NAME = '${LOGIN_MDM_USER.deptName}';
	Right.PERSON_CODE = '${LOGIN_MDM_USER.personCode}';
	Right.PERSON_NAME = '${LOGIN_MDM_USER.personName}';
	Right.PROV_ORG_CODE = '${LOGIN_MDM_USER.provOrgCode}'; //省管代码
	Right.isProv = ${LOGIN_MDM_USER.prov}; //是为省管人员 否地市人员

	if (typeof document.body != 'undefined' && document.body) {
		SYSD.CLIENTHEIGHT = document.body.clientHeight;
		SYSD.CLIENTWIDTH = document.body.clientWidth;
	} else if (typeof document.documentElement != 'undefined' && document.documentElement) {
		SYSD.CLIENTHEIGHT = document.documentElement.clientHeight;
		SYSD.CLIENTWIDTH = document.documentElement.clientWidth;
	}
	Ext.getDoc().on('keydown', function(e) {
		if (e.getKey() == 8 && e.getTarget().type == 'text' && !e.getTarget().readOnly) {
		} else if (e.getKey() == 8 && e.getTarget().type == 'textarea' && !e.getTarget().readOnly) {
		} else if (e.getKey() == 8 && e.getTarget().type == 'password' && !e.getTarget().readOnly) {
		} else if (e.getKey() == 8) {
			e.preventDefault();
		}
	});
	/*	Ext.override(Ext.form.TextField,{
		    stripCharsRe : /^\s+|\s+$/g,
		    suffRemark:'',
		    listeners : {
		       render : function (){
		           if(!this.allowBlank){
		               var parentsteal = this.getEl().dom.parentNode;
		               Ext.get(parentsteal).createChild({
		                   tag:'span',
		                   cls : 'field_not_blank',
		                   html:'<font color="red" size="3">*</font>'
		               });
		           };

		           if(this.suffRemark != null && this.suffRemark != ''){
		               var parentsteal = this.getEl().dom.parentNode;
		               Ext.get(parentsteal).createChild({
		                   tag:'span',
		                   cls : 'field_not_blank',
		                   html:'<font color="blue" size="2">'+this.suffRemark+'</font>'
		               });
		           };
		       }
		   }
		}); */

	//重载控件，使得在非空项后加入*号
	/*
	Ext.override(Ext.form.TextField,{
	    invalidText : '该输入项不能为空!',
	    stripCharsRe : /^\s+|\s+$/g,
	    validator : function (text){
	        if(this.allowBlank==false && Ext.util.Format.trim(text).length==0){
	              return false;
	        }else{
	             return true;
	        }
	    },
	    listeners : {
	       render : function (){
	           if(!this.allowBlank){
	               var parentsteal = this.getEl().dom.parentNode;
	               Ext.get(parentsteal).createChild({
	                   tag:'span',
	                   cls : 'field_not_blank',
	                   html:'<font color="red" size="3">*</font>'
	               });
	           };
	       }
	   }
	});

	Ext.override(Ext.form.ComboBox,{
	    listeners : {
	       render : function (){
	           if(!this.allowBlank){
	               var parentsteal = this.getEl().dom.parentNode;
	               Ext.get(parentsteal).createChild({
	                   tag:'span',
	                   cls : 'trigg_not_blank',
	                   html:'<font color="red" size="3">*</font>'
	               });
	           };
	       }
	   }
	});
	Ext.override(Ext.form.TextArea,{
	 listeners : {
	       render : function (){
	           if(!this.allowBlank){
	               var parentsteal = this.getEl().dom.parentNode;
	               Ext.get(parentsteal).createChild({
	                   tag:'span',
	                   cls : 'area_not_blank',
	                   html:'<font color="red" size="3">*</font>'
	               });
	           };
	       }
	   }
	});

	Ext.override(Ext.form.DateField,{
	 listeners : {
	       render : function (){
	           if(!this.allowBlank){
	               var parentsteal = this.getEl().dom.parentNode;
	               Ext.get(parentsteal).createChild({
	                   tag:'span',
	                   cls : 'trigg_not_blank',
	                   html:'<font color="red" size="3">*</font>'
	               });
	           };
	       }
	   }
	});
	 */
	String.prototype.len = function() {
		return this.replace(/[^\x00-\xff]/g, "aa").length;
	}

	String.prototype.trim = function() {
		return this.replace(/^( |[\s　])+|( |[\s　])+$/g, '');
	};

	String.prototype.startWith = function(compareStr) {
		return this.indexOf(compareStr) == 0;
	}

	function getQueryString(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
		var r = window.location.search.substr(1).match(reg);
		if (r != null)
			return unescape(r[2]);
		return "";
	}
</script>